<?php if($user->access!=0){ ?>
<div id="page_acceuil">
<div id="table_list_server">
<table id="table_list_server">
<caption>Serveurs up</caption>
<tr>
	<td class="title">Name</td>
	<td class="title">Ping</td>
</tr>

<?php 
	$sql_query=mysql_query("Select address,name from ".DATABASE_TABLE_SERVER." ORDER BY `name` ASC") or die(mysql_error());
	$javascript_string="";
	while ($query = mysql_fetch_array($sql_query)){
		$javascript_string = $javascript_string."\"".mise_en_forme_address($query['address'])."\",";
?>
<tr>
	<td class="column_margin"><?php print $query['name']; ?></td>
	<td id="<?php print mise_en_forme_address($query['address']); ?>"></td>
</tr>
<?php
	}
	$javascript_string = substr($javascript_string,0,-1);
?>
</table>
<script>
	var arrayserv = new Array(<?php print $javascript_string; ?>);
	ajax_multiping(arrayserv);
</script>
</div>
<div id="div_last_film">
<table id="table_last_film" >
<caption>Last films</caption>
<tr>
	<td class="title" >Title</td>
	<td class="title" >Server</td>
</tr>
<?php 
$def_array	= $def_film;
$sql_query=mysql_query("SELECT ".DATABASE_TABLE_FILE.".name, ".DATABASE_TABLE_FILE.".taille, ".DATABASE_TABLE_FILE.".date, ".DATABASE_TABLE_FILE.".server 
			FROM ".DATABASE_TABLE_FILE." WHERE (".array_in_where_clause(DATABASE_TABLE_FILE.".name",$def_array).")  ORDER BY date DESC LIMIT 5") or die(mysql_error());
while ($query = mysql_fetch_array($sql_query)){
?>
	<tr>
		<td class="column_margin2"><a target="_blank" href="http://www.allocine.fr/recherche/?motcle=<?php print rm_ext($query['name']) ?>&x=0&y=0&rub=0" ><img style="border:0;" src="img/allo.ico" alt="BA"   /></a><a href="index.php?film=<?php print md5($query['name']); ?>&idserver=<?php print $query['server']; ?>"><?php print htmlspecialchars(stripslashes(rm_ext($query['name'])));?></a></td>
		<td><?php print $query['server']; ?></td>
	</tr>
<?php 
}
?>
</table>
</div>
</div>
<?php } ?>